In computer systems, host computers are connected to a bus or network through I/0 device interfaces. The device interface transfers data packets from a sending host computer to other receiving host computers connected to the bus or network.
In systems where the bandwidth of the device interface demands substantial bandwidth from a busy host computer, buffering of packets received by the host computer becomes important. For example, a burst of packets directed to a specific host computer may be received more rapidly than the host computer can use the packets. Buffers are provided in the host computer in order to provide temporary storage for packets received by the host computer.
The process whereby the device interface determines the location of a host data buffer commonly involves the manipulation of a shared data structure, such as a ring. The ring contains entries which act, among other things, as pointers to memory data buffers. When a packet arrives, the ring is accessed to obtain the address of the next available memory buffer, and the packet is stored in that buffer.
Buffers must be provided for many different types of packets. For instance, packets of many different sizes must be stored. Some operating systems allow allocation of many small buffers which may be "chained" together to store a large packet. However, some operating systems do not allow buffer chaining. For these systems, all buffers for packets must be large enough to store the maximum size packet which may be received. However, in order to accommodate large packets, a significant amount of memory may be wasted by storing small received packets in large buffers.
Also, in a receive ring system, all packets are directed to the same ring buffer area. In a system supporting multiple network users, packets destined for different users are scattered throughout the ring buffer area. The host cpu must then copy the packets for a single user from the ring buffer area to an area allocated to the user. This copying decreases available cpu bandwidth, and throughput to the user.
A problem in device interface design is to provide a way to optimize buffer usage and to minimize usage of cpu memory bandwidth for storage of the variety of packets arriving at the interface.